package com.paypal.android.MEP.a;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import com.paypal.android.MEP.PayPalActivity;
import com.paypal.android.MEP.b.d;
import com.paypal.android.MEP.p;
import com.paypal.android.a.g;
import com.paypal.android.a.q;
import com.paypal.android.b.k;
import com.paypal.android.b.m;
import com.paypal.android.b.n;
import java.util.Hashtable;

public final class a extends n
  implements View.OnClickListener, d, com.paypal.android.MEP.r, com.paypal.android.b.i
{
  public static Hashtable a = null;
  private static com.paypal.android.b.f n = null;
  private c b;
  private com.paypal.android.MEP.b.e c;
  private Button d;
  private Button e;
  private com.paypal.android.MEP.b.a f;
  private com.paypal.android.MEP.b.a g;
  private com.paypal.android.MEP.b.a h;
  private k i;
  private String j;
  private LinearLayout k;
  private RelativeLayout l;
  private TextView m = null;
  private Context o;

  public a(Context paramContext)
  {
    super(paramContext);
    this.o = paramContext;
  }

  private void b(String paramString)
  {
    LinearLayout localLinearLayout = com.paypal.android.a.f.a(this.o, -1, -2);
    RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(localLinearLayout.getLayoutParams());
    localLayoutParams.addRule(13);
    localLinearLayout.setLayoutParams(localLayoutParams);
    localLinearLayout.setOrientation(1);
    localLinearLayout.setGravity(1);
    if (n == null)
      n = new com.paypal.android.b.f(this.o);
    while (true)
    {
      this.m = q.a(com.paypal.android.a.r.b, this.o);
      this.m.setGravity(1);
      this.m.setTextColor(-13408615);
      this.m.setText(paramString);
      localLinearLayout.addView(n);
      localLinearLayout.addView(this.m);
      this.l.removeAllViews();
      this.l.addView(localLinearLayout);
      return;
      ((LinearLayout)n.getParent()).removeAllViews();
    }
  }

  public final void a()
  {
    com.paypal.android.a.c.f().a("delegate", this);
    com.paypal.android.a.c.f().a(4);
  }

  public final void a(int paramInt, Object paramObject)
  {
    com.paypal.android.MEP.e locale;
    PayPalActivity localPayPalActivity;
    String str1;
    String str2;
    if (this.b == c.b)
    {
      locale = com.paypal.android.MEP.e.a();
      localPayPalActivity = PayPalActivity.a();
      com.paypal.android.a.c localc = com.paypal.android.a.c.f();
      str1 = (String)localc.d("PayKey");
      str2 = (String)localc.d("PaymentExecStatus");
      if (locale.k() == 2)
      {
        localPayPalActivity.a(true);
        localPayPalActivity.a(str1, str2, false);
        k.a = (String)paramObject;
        h.b(7);
      }
    }
    else
    {
      return;
    }
    if ((locale.v()) || (locale.F()) || (locale.A() == 3))
    {
      localPayPalActivity.a(str1, str2, true);
      return;
    }
    localPayPalActivity.a(true);
    localPayPalActivity.a(str1, str2, false);
    k.a = (String)paramObject;
    h.b(7);
  }

  public final void a(Context paramContext)
  {
    com.paypal.android.MEP.e locale = com.paypal.android.MEP.e.a();
    super.a(paramContext);
    this.o = paramContext;
    this.b = c.a;
    LinearLayout localLinearLayout1 = com.paypal.android.a.f.a(paramContext, -1, -2);
    localLinearLayout1.setOrientation(1);
    localLinearLayout1.setPadding(5, 5, 5, 15);
    localLinearLayout1.addView(q.b(com.paypal.android.a.r.a, paramContext));
    this.c = new com.paypal.android.MEP.b.e(paramContext, this);
    this.c.a(this);
    localLinearLayout1.addView(this.c);
    addView(localLinearLayout1);
    this.k = new LinearLayout(paramContext);
    this.k.setOrientation(1);
    this.k.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
    this.k.setPadding(5, 5, 5, 5);
    this.k.setBackgroundDrawable(com.paypal.android.a.f.a());
    com.paypal.android.b.j localj = new com.paypal.android.b.j(com.paypal.android.a.j.a("ANDROID_review"), paramContext);
    this.k.addView(localj);
    LinearLayout localLinearLayout2 = com.paypal.android.a.f.a(paramContext, -1, -2);
    localLinearLayout2.setOrientation(1);
    localLinearLayout2.setPadding(5, 10, 5, 10);
    this.i = new k(paramContext, m.b);
    this.i.a("This page is currently being used to test components.");
    this.i.setPadding(0, 5, 0, 5);
    this.i.setVisibility(8);
    localLinearLayout2.addView(this.i);
    this.k.addView(localLinearLayout2);
    this.g = new com.paypal.android.MEP.b.a(paramContext, com.paypal.android.MEP.b.c.b, this);
    this.g.a(this);
    this.g.setPadding(0, 5, 0, 5);
    this.g.a(this);
    if (com.paypal.android.MEP.e.a().D())
      this.k.addView(this.g);
    this.f = new com.paypal.android.MEP.b.a(paramContext, com.paypal.android.MEP.b.c.a, this);
    this.f.a(this);
    this.f.setPadding(0, 5, 0, 5);
    this.f.a(this);
    this.k.addView(this.f);
    this.h = new com.paypal.android.MEP.b.a(paramContext, com.paypal.android.MEP.b.c.c, this);
    this.h.a(this);
    this.h.setPadding(0, 5, 0, 5);
    this.h.a(this);
    if (locale.n())
      this.k.addView(this.h);
    LinearLayout localLinearLayout3 = com.paypal.android.a.f.a(paramContext, -1, -2);
    localLinearLayout3.setGravity(1);
    localLinearLayout3.setPadding(5, 10, 5, 5);
    this.e = new Button(paramContext);
    LinearLayout localLinearLayout5;
    if (locale.l() == 1)
    {
      this.e.setText(com.paypal.android.a.j.a("ANDROID_donate"));
      this.e.setLayoutParams(new LinearLayout.LayoutParams(-1, com.paypal.android.a.f.b(), 0.5F));
      this.e.setGravity(17);
      this.e.setBackgroundDrawable(g.a());
      this.e.setTextColor(-16777216);
      this.e.setOnClickListener(this);
      localLinearLayout3.addView(this.e);
      this.k.addView(localLinearLayout3);
      LinearLayout localLinearLayout4 = com.paypal.android.a.f.a(paramContext, -1, -2);
      localLinearLayout4.setGravity(1);
      localLinearLayout4.setPadding(5, 5, 5, 10);
      this.d = new Button(paramContext);
      this.d.setText(com.paypal.android.a.j.a("ANDROID_cancel"));
      this.d.setLayoutParams(new LinearLayout.LayoutParams(-1, com.paypal.android.a.f.b(), 0.5F));
      this.d.setGravity(17);
      this.d.setBackgroundDrawable(g.b());
      this.d.setTextColor(-16777216);
      this.d.setOnClickListener(this);
      localLinearLayout4.addView(this.d);
      this.k.addView(localLinearLayout4);
      addView(this.k);
      this.l = new RelativeLayout(paramContext);
      this.l.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
      this.l.setBackgroundDrawable(com.paypal.android.a.f.a());
      localLinearLayout5 = com.paypal.android.a.f.a(paramContext, -1, -2);
      RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(localLinearLayout5.getLayoutParams());
      localLayoutParams.addRule(13);
      localLinearLayout5.setLayoutParams(localLayoutParams);
      localLinearLayout5.setOrientation(1);
      localLinearLayout5.setGravity(1);
      if (n != null)
        break label926;
      n = new com.paypal.android.b.f(paramContext);
    }
    while (true)
    {
      this.m = q.a(com.paypal.android.a.r.b, paramContext);
      this.m.setGravity(1);
      this.m.setTextColor(-13408615);
      this.m.setText(com.paypal.android.a.j.a("ANDROID_processing_transaction_message"));
      localLinearLayout5.addView(n);
      localLinearLayout5.addView(this.m);
      this.l.addView(localLinearLayout5);
      this.l.setVisibility(8);
      addView(this.l);
      if (!com.paypal.android.MEP.e.a().G())
        this.c.a(false, false);
      return;
      this.e.setText(com.paypal.android.a.j.a("ANDROID_pay"));
      break;
      label926: ((LinearLayout)n.getParent()).removeAllViews();
    }
  }

  public final void a(c paramc)
  {
    this.b = paramc;
    h.b();
  }

  public final void a(com.paypal.android.MEP.b.a parama, int paramInt)
  {
    switch (b.a[parama.b().ordinal()])
    {
    default:
    case 1:
    case 2:
    case 3:
    }
    do
    {
      do
      {
        do
          return;
        while (this.f == null);
        this.f.setNextFocusUpId(paramInt);
        return;
      }
      while (this.h == null);
      this.h.setNextFocusUpId(paramInt);
      return;
    }
    while (this.e == null);
    this.e.setNextFocusUpId(paramInt);
  }

  public final void a(com.paypal.android.b.h paramh, int paramInt)
  {
    if (paramInt == 1)
    {
      if ((this.c != null) && (paramh != this.c))
        this.c.a(0);
      if ((this.f != null) && (paramh != this.f))
        this.f.a(0);
      if ((this.g != null) && (paramh != this.g))
        this.g.a(0);
      if ((this.h != null) && (paramh != this.h))
        this.h.a(0);
    }
  }

  public final void a(String paramString)
  {
    if (this.b == c.b)
    {
      this.j = paramString;
      a(c.c);
    }
  }

  public final void a(String paramString, Object paramObject)
  {
  }

  public final c b()
  {
    return this.b;
  }

  public final void c()
  {
    if (this.c != null)
      this.c.a(0);
    if (this.f != null)
      this.f.a(0);
    if (this.g != null)
      this.g.a(0);
    if (this.h != null)
      this.h.a(0);
  }

  public final void d()
  {
    if (this.f != null)
      this.f.c();
    if (this.g != null)
      this.g.c();
    if (this.h != null)
      this.h.c();
    if (this.b == c.b)
    {
      b(com.paypal.android.a.j.a("ANDROID_processing_transaction_message"));
      this.c.a(false, true);
      this.k.setVisibility(8);
      this.l.setVisibility(0);
      n.a();
    }
    do
    {
      return;
      if (this.b == c.d)
      {
        b(com.paypal.android.a.j.a("ANDROID_getting_information"));
        this.c.a(false, true);
        this.k.setVisibility(8);
        this.l.setVisibility(0);
        n.a();
        return;
      }
    }
    while ((this.b != c.a) && (this.b != c.c));
    if (com.paypal.android.MEP.e.a().G())
      this.c.a(true, false);
    while (true)
    {
      n.b();
      this.l.setVisibility(8);
      this.k.setVisibility(0);
      if (this.b != c.c)
        break;
      this.i.a(this.j);
      this.i.setVisibility(0);
      return;
      this.c.a(false, false);
    }
  }

  public final void e()
  {
  }

  public final void onClick(View paramView)
  {
    if (this.d == paramView)
      new com.paypal.android.MEP.b.i(PayPalActivity.a()).show();
    do
    {
      return;
      if (this.e == paramView)
      {
        a(c.b);
        if (com.paypal.android.MEP.e.a().k() == 2)
        {
          a(4, "10088342");
          return;
        }
        p.a().a(this);
        return;
      }
      if ((0x7F000000 & paramView.getId()) == 2130706432)
      {
        this.f.a(0);
        return;
      }
      if ((0x7E000000 & paramView.getId()) == 2113929216)
      {
        this.g.a(0);
        return;
      }
    }
    while ((0x7D000000 & paramView.getId()) != 2097152000);
    this.h.a(0);
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.paypal.android.MEP.a.a
 * JD-Core Version:    0.6.2
 */